package com.cchr.acms.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cchr.acms.dao.FacilityInfoDAO;
import com.cchr.acms.model.FacilityInfo;
import com.cchr.acms.service.FacilityInfoService;

/**
 * @author Zeng
 *
 */
@Service
public class FacilityInfoServiceImpl implements FacilityInfoService{
 
	@Autowired
	private FacilityInfoDAO facilityInfoDAO;
     
	public int insertFacilityInfo(FacilityInfo baseInfo) {
		return facilityInfoDAO.insertFacilityInfo(baseInfo);
	}

    public int updateFacilityInfo(FacilityInfo baseInfo) {
    	return facilityInfoDAO.updateFacilityInfo(baseInfo);
    }
    
    public FacilityInfo queryFacilityInfoById(int id) {
    	return facilityInfoDAO.queryFacilityInfoById(id);
    }
    
    public int deleteFacilityInfoById(int id) {
    	return facilityInfoDAO.deleteFacilityInfoById(id);
    }
    
	public List<FacilityInfo> getAllFacility() {
		return facilityInfoDAO.getAllFacility();
	}

	public List<FacilityInfo> getFacilityInfoByCaseId(int caseId) {
		return facilityInfoDAO.getFacilityInfoByCaseId(caseId);
	}

	public void deleteFacilityInfoByCaseId(int caseId) {
		facilityInfoDAO.deleteFacilityInfoByCaseId(caseId);
	}
}
